package xc.controller;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xc.entity.User;
import xc.service.UserService;

import javax.annotation.Resource;

/**
 * ClassName:UserController
 * Description:
 *
 * @Author chenxing
 * @Create 2025/6/19 16:16
 */
@RestController
@RequestMapping("/user")
public class UserController {

    //@Resource
    @Reference(version = "1.0.0",parameters = {"unicast","false"})
    private UserService userService;



    @GetMapping("/getUserById/{userId}")
    public User getUserById(@PathVariable("userId") Integer userId) {

        User user = userService.getUserById(userId);

        return user;
    }


}
